/**
 * Created by x on 17-8-4.
 */

angular.module('smartEquipment', []).component(
    'smartEquipment',
    {
        templateUrl: 'component/base/smartEquipment/smart_equipment.template.html',
        controller: ['$scope','$rootScope','$location','Api','Alert','$state','$stateParams',
            function ($scope,$rootScope,$location,Api,Alert,$state,$stateParams) {
            var statePath = $location.$$url;

        $scope.apartmentId = statePath.split("/")[statePath.split("/").length - 1];
        $scope.gotoAddSmartEquipment = gotoAddSmartEquipment;
        function gotoAddSmartEquipment() {
            $state.go('company.companyaddSmartEquipment',{apartmentId:$scope.apartmentId});
        }

            }]
    }
);

